import request from "@/utils/request.js";

const url = '/cloud-sys-service/sys-dict-type'

/**
 * 获取字典类型列表
 */
export function list(data) {
	return request({
		url: url + "/list",
		method: "post",
		data
	});
}

/**
 * 新增或修改字典类型
 */
export function save(data) {
	return request({
		url: url + "/save",
		method: "post",
		data
	});
}

/**
 * 删除字典类型
 */
export function remove(id) {
	return request({
		url: url + `/remove/${id}`,
		method: "get",
	});
}

// 列表相关列信息
export const columnInfo = [
	{
		"title":"字典类型",
		"field":"name",
		"fixed":"left",
		"align":"center",
		"proxyColumn":true,
		"minWidth":"100"
	},
	{
		"title":"字典编码",
		"field":"code",
		"align":"center",
		"minWidth":"100"
	},
	{
		"title":"状态",
		"field":"status",
		"align":"center",
		"proxyColumn":true,
		"width":"80"
	},
	{
		"title":"备注",
		"field":"remark",
		"align":"center",
		"minWidth":"250"
	},
	{
		"title":"操作",
		"field":"operate",
		"fixed":"right",
		"align":"center",
		"proxyColumn":true,
		"minWidth":"220px",
		/*"options":[
			{
				"text":true,
				"btnName":"编辑",
				"type":"primary",
				"icon":"Edit",
				"method":"showFormDialog"
			},
			{
				"text":true,
				"btnName":"删除",
				"type":"primary",
				"icon":"Delete",
				"method":"showRemoveDialog",
				"color":"#ff4949"
			}
		]*/
	}
]
